package gui;

import javax.swing.JLabel;
import javax.swing.JSlider;
import javax.swing.JTextField;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * LCSSlider.java
 *
 * Created on 11/03/2013, 14:53:18
 */
/**
 *
 * @author Gabriel
 */
public class LCSSlider extends javax.swing.JPanel {

    /** Creates new form LCSSlider */
    public LCSSlider() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        jSlider1 = new javax.swing.JSlider();
        lblPorcentagem = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();

        setMaximumSize(new java.awt.Dimension(240, 237));
        setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel1.setText("Função:");
        add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(84, 0, -1, -1));

        jPanel1.setLayout(new javax.swing.BoxLayout(jPanel1, javax.swing.BoxLayout.LINE_AXIS));

        jSlider1.setValue(100);
        jSlider1.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                jSlider1StateChanged(evt);
            }
        });
        jPanel1.add(jSlider1);

        lblPorcentagem.setText("100");
        jPanel1.add(lblPorcentagem);

        jLabel2.setText("%");
        jPanel1.add(jLabel2);

        add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 14, 240, -1));
    }// </editor-fold>//GEN-END:initComponents

private void jSlider1StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jSlider1StateChanged
    lblPorcentagem.setText(jSlider1.getValue() + "");
}//GEN-LAST:event_jSlider1StateChanged

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JSlider jSlider1;
    private javax.swing.JLabel lblPorcentagem;
    // End of variables declaration//GEN-END:variables

    public JSlider getjSlider1() {
        return jSlider1;
    }

    public void setjSlider1(JSlider jSlider1) {
        this.jSlider1 = jSlider1;
    }

    public String getjLabelText() {
        return jLabel1.getText();
    }

    public void setjLabelText(String text) {
        jLabel1.setText(text);
    }


    
}
